package com.igeek.boot.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author jwj
 * @since 2023-12-26
 */
@Data
@TableName("assets")
@ApiModel(value="Assets对象", description="")
public class Assets implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "资产ID（AssetID）：唯一标识每个物资的ID")
    @TableId(value = "assetID", type = IdType.AUTO)
    private Integer assetID;

    @ApiModelProperty(value = "物资名称（AssetName）：物资的名称")
    private String assetName;

    @ApiModelProperty(value = "物资类型（AssetType）：物资的类型")
    private String assetType;

    @ApiModelProperty(value = "数量（Quantity）：物资的数量")
    private Integer quantity;

    @ApiModelProperty(value = "采购日期（update_date）：物资的更新日期")
    @TableField(value = "update_time" ,fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "如果入库表没有该商品的名称，就添加商品信息")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "版本号，保证出入库操作的原子性")
    private Integer version;

    @ApiModelProperty(value = "逻辑删除，0代表未删除，1代表删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "外键：关联货架表ID，指定向哪个货架添加")
    @TableField("shelf_id")
    private Integer shelfId;

    @ApiModelProperty(value = "所属货架名称")
    @TableField(exist = false)
    private String shelfName;
}
